﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>会员列表</title>
</head>
<body>
    <div>
        <div style="padding-top: 0px;">
            <div id="member" style="display:none" >
                <el-form ref="form"
                           size="mini"
                         :model="form" >
                    <el-form-item>
                        用户名/登录账户：
                        <el-input prefix-icon="el-icon-search"
                                  placeholder="请输入用户名/登录账户"
                                  v-model="form.account"></el-input>
                        <el-button type="primary" @click="onQuery">查询</el-button>
                        <el-button  icon="el-icon-plus" type="success" @click="AddUser">增加用户</el-button>
                    </el-form-item>
                </el-form>
                <el-table :data="mData"
                          border
                          stripe
                          size="mini"
                          max-height="429"
                          style="width: 100%;">
                    <el-table-column type="index"
                                     fixed
                                     :index="indexMethod">
                    </el-table-column>
                    <el-table-column fixed prop="account"
                                     label="登录账户"
                                     width="120">
                    </el-table-column>
                    <el-table-column fixed prop="name"
                                     label="用户名"
                                     width="120">
                    </el-table-column>
                    <el-table-column 
                                     prop="state"
                                     label="状态"
                                     width="100">
                        <template slot-scope="scope">
                            <el-tag :type="scope.row.state==1?'success':'danger'">{{scope.row.state==1?"启用":"禁用"}}</el-tag>
                        </template>
                    </el-table-column>
                    <el-table-column 
                                     prop="co"
                                     label="公司编码"
                                     width="120">
                    </el-table-column>
                    <el-table-column 
                                     prop="co_n"
                                     label="公司名称"
                                     width="120">
                    </el-table-column>
                    <el-table-column prop="position"
                                     label="职位"
                                     width="120">
                    </el-table-column>
                    <el-table-column prop="timespan"
                                     label="最近登录"
                                     width="180">
                    </el-table-column>
                    <el-table-column prop="rdt"
                                     label="注册时间"
                                     width="180">
                    </el-table-column>
                    <el-table-column fixed="right"
                                     align="center"
                                     width="220"
                                     label="操作">
                        <template slot-scope="scope">
                            <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
                            <el-button @click="reSet(scope.row)" type="text" size="small">重置密码</el-button>
                            <el-button v-if="scope.row.state==1" @click="EditState(scope.row,0)" type="text" size="small">禁用</el-button>
                            <el-button v-if="scope.row.state!=1" @click="EditState(scope.row,1)" type="text" size="small">启用</el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <div class="block" style="text-align:center">
                    <el-pagination @size-change="handleSizeChange"
                                   @current-change="handleCurrentChange"
                                   :current-page="currentPage"
                                   :page-sizes="pagesizes"
                                   :page-size="pagesize"
                                   layout="total, sizes, prev, pager, next, jumper"
                                   :total="total">
                    </el-pagination>
                </div>
            </div>
        </div>
    </div>
</body>

<!-- 先引入 Vue -->
<!--<script src="../../js/vue.min.js"></script>-->
<!--<link href="../../css/element-ui-index.css" rel="stylesheet" />-->
<!-- 引入组件库 -->
<!--<script src="../../js/element-ui-index.js"></script>-->
<!-- 生产环境版本，优化了尺寸和速度 -->
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js"></script>
<!-- 引入样式 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/element-ui@2.14.0/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://cdn.jsdelivr.net/npm/element-ui@2.14.0/lib/index.js"></script>

<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
<script src="../../js/base.js"></script>
<script src="index.js"></script>
<style>
    .el-input {
        width: 25%;
    }
    .el-button {
        font-size: 10px;
    }
    .warning-row {
        background: oldlace;
    }

    .success-row {
        background: #f0f9eb;
    }
    body {
        height: 100%;
        -moz-osx-font-smoothing: grayscale;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
        font-family: Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Arial,sans-serif;
    }
</style>
</html>